#ifndef ACCOUNTSITEMMODEL_H
#define ACCOUNTSITEMMODEL_H

#include "listmodel.h"

class AccountsItemModel : public ListItem
{
    Q_OBJECT

public:
    enum Roles {
        accJid = Qt::UserRole+1,
        accPasswd,
        accIcon,
        accDefault
      };

public:
      AccountsItemModel(QObject *parent = 0): ListItem(parent) {}
      explicit AccountsItemModel( const QString &_accountJid,
                                  const QString &_accountPasswd,
                                  const QString &_accountIcon,
                                  const bool _accountDefault,
                                  QObject *parent = 0 );

      virtual QVariant data(int role) const;
      virtual QHash<int, QByteArray> roleNames() const;

      virtual QString id() const { return m_jid; }

      void setJid( QString &_accountJid );
      void setPasswd( QString &_accountPasswd );
      void setIcon( QString &_accountIcon );
      void setDefault( bool &_accountDefault );

      inline QString jid() const { return m_jid; }
      inline QString passwd() const { return m_passwd; }
      inline QString icon() const { return m_icon; }
      inline bool isDefault() const { return m_default; }


    private:
      QString m_jid;
      QString m_passwd;
      QString m_icon;
      bool m_default;

};

#endif // ACCOUNTSITEMMODEL_H
